<template>
  <div>
    <div class="box">
      <li>客户</li>
      <li class="box1">小狼公司</li>
    </div>
    <div class="box">
      <li>商品</li>
      <li class="box1">小狼公司</li>
    </div>
    <div class="box">
      <li>数量</li>
      <li class="box1">小狼公司</li>
    </div>
    <div class="box">
      <li>下单人</li>
      <li class="box1">靓仔</li>
    </div>
    <div class="box">
      <li>下单时间</li>
      <li class="box1">小狼公司</li>
    </div>

    <ul>
      <li>
        <div class="app-1">
          <div>收货人</div>
          <span><input type="text" v-model="valueshr" /></span>
        </div>
      </li>
      <li>
        <div class="app-2">
             <div>联系电话</div>
             <span><input type="number" v-model="valuelxdh"></span>
           </div>
      </li>
      <li>
         <div class="app-3">
             <div>收货地址</div>
             <span><textarea v-model="valueshdz" ></textarea></span>
           </div>
      </li>
      <li>
         <div class="app-4">
             <div>物流单号</div>
             <span><input type="number" v-model="valuewldh"></span>
           </div>
      </li>
    </ul>
    <van-button @click="add" round type="info">确认发货</van-button>
  </div>
  <!-- 

serialNo	string	true	普通参数		订单号
receiver	string	true	普通参数		收货人
linkPhone	string	true	普通参数		联系电话
address	string	true	普通参数		收货地址
logisticsCode	string	true	普通参数		物流单号

   -->
</template>

<script>
import { sendData } from "../request/api";
export default {
  data() {
    return {
      valueshr: "",
      valuelxdh: "",
      //地址
      valueshdz: "",
      valuewldh: "",
      serialNo: this.$route.query.serialNo,
    };
  },
  //   sendData({})
  methods: {
    add() {
        console.log(this.serialNo,444);
        console.log(this.valueshr,333);
        console.log(this.valuelxdh,222);
        console.log(this.valueshdz,111);
        console.log(this.valuewldh);
      sendData({
        serialNo: this.serialNo,
        receiver: this.valueshr,
        linkPhone: this.valuelxdh,
        address: this.valueshdz,
        logisticsCode: this.valuewldh,
      }).then((res) => {
       this.$router.push('/orderList?id=3')
      });
    },
  },
};
// if(res.errCode=="0"){
//         this.$toast.success(res.message)
//         setTimeout(()=>{
//           this.$router.push("/Consignment?id=1")

//         },1000)
</script>
 
<style lang = "less" scoped>
* {
  margin: 0;
  padding: 0;
  list-style: none;
}
.box {
  display: flex;
  li {
    flex: 1;
    line-height: 40px;
    margin-left: 10px;
  }
  .box1 {
    text-align: right;
    margin-right: 10px;
  }
}

.app-1,.app-2,.app-3,.app-4{
    display: flex;
    margin: 10px;
    div{
        width: 20%;
    }
    span{
        flex: 1;
    }
}

.van-button {
  width: 100%;
  font-size: 20px;
}
</style>